<?php
/**
 * Dirox Framework
 * Copyright (C) 2005 - 2007 Dirox / Synexser
 * 
 * All rights reserved.
 */
 
require_once 'PEAR.php';

class DRX extends PEAR {
	static $_registry;
	
	static function _initRegistry()
	{
		DRX::$_registry = array();
	}
	
	static function register($object_name, $object)
	{
		if (DRX::$_registry === null) {
			DRX::_initRegistry();
		}
		
		DRX::$_registry[$object_name] = $object;
	}
	
	static function load($object_name)
	{
		if (DRX::$_registry === null) {
			DRX::_initRegistry();
		}
		
		return DRX::$_registry[$object_name];
	}
}
?>